package com.xiyoo.cw.domain.user;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @Description
 * @Author zhouzhongqing
 * @Date 2025/5/13 12:53
 * @Version 1.0
 **/
@Data
public class UserRequest {

    @ApiModelProperty("邮箱")
    @NotEmpty(message = "email为必填")
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@mhdchina\\.cn$", message = "请输入正确的邮箱，必须以@mhdchina.cn为后缀")
    private String email;

    @ApiModelProperty("昵称")
    @NotEmpty(message = "昵称为必填")
    private String nickName;

    @ApiModelProperty("验证码")
    @NotEmpty(message = "验证码为必填")
    @Pattern(regexp = "^\\d{6}$", message = "验证码必须是6位数纯数字")
    private String captcha;
}
